require('module-alias/register')

const Koa = require('koa');
const parser = require('koa-bodyparser')
const catchError = require('./middlewares/exception')

const app = new Koa();
const InitManager = require('./core/init')

// 注册中间键
app.use(catchError)
app.use(parser())

InitManager.initCore(app)


app.listen(3000, () => {
    console.log('服务器正在开启...')
})